package com.sbj.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author summer
 * @since 2024/08/10 10:02:39
 * 商城订单
 */
@Getter
@Setter
@TableName("member_order")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("member_id")
    private Integer memberId;

    @TableField("goods_id")
    private Integer goodsId;

    @TableField("goods_num")
    private Integer goodsNum;

    @TableField("goods_price")
    private BigDecimal goodsPrice;

    @TableField("order_no")
    private String orderNo;

    /**
     * 0 未支付 1 待发货 3 待收货 4 已完成
     */
    @TableField("order_state")
    private Integer orderState;

    /**
     * 下单时间
     */
    @TableField(value = "createTime", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 支付时间
     */
    @TableField(value = "pay_time")
    private LocalDateTime payTime;

    /**
     * 收货地址
     */
    @TableField("address_id")
    private Integer addressId;

    /**
     * 支付凭证
     */
    @TableField("pay")
    private String pay;


}
